package com.showgood.controller {
	import com.adobe.serialization.json.JSON;
	import com.showgood.config.PopupConfig;
	import com.showgood.core.AbstractSimpleCommand;
	import com.showgood.config.SangoConst;
	import com.showgood.model.PopupStackProxy;
	import com.showgood.socket.ArraySocketCommand;
	import com.showgood.vo.CityVO;
	import com.showgood.vo.ManVO;
	import com.showgood.vo.RemoteMessage;
	import com.showgood.vo.BaseVO;
	import org.puremvc.as3.interfaces.INotification;
	import com.showgood.view.CityDialog;
	import com.showgood.view.ChuZhengDialog;
	
	/**
	 * 返回了可以出征的武将
	 * @author bianpeng
	 */
	public class ReplyManListCommand extends AbstractSimpleCommand {
		
		public function ReplyManListCommand() {
			super();	
		}
		override public function execute(notify:INotification):void {
			var _command:ArraySocketCommand = notify.getBody() as ArraySocketCommand;
			var _mans:Vector.<BaseVO> = _command.data;
			switch(_command.message()) {
			case RemoteMessage.REMOTE_QUERY_CHUZHENG_MAN_LIST:
				var _p:PopupStackProxy = sangoFacade.retrieveProxyByType(PopupStackProxy) as PopupStackProxy;
				_p.pushWindow(PopupConfig.CHUZHENG_DIALOG).center();
				var _dlg:ChuZhengDialog = _p.topwindow.window as ChuZhengDialog;
				_dlg.manList.nameList = _mans;
				break;
			}
		}
	}
}

